﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace STKMIS.Model
{
    /// <summary>
    /// 的实体类
    /// </summary>
    [Serializable]
    public class SaleItemModel
    {
         // 常量
        public const string tableName = "SaleItem";
        public const string primaryKeyName = "SaleItemID";

        // 成员变量
        private int _saleItemID;
        private int _saleID;
        private int _productsAndUnitID;
        private decimal _saleAmount;
        private decimal _salePrice;
        private decimal _saleMoney;
        private decimal _saleProfit;
        private Boolean _isDeleted;

        /// <summary>
        /// 字段名结构
        /// <summary>
        public struct FieldName
        {
            public const string saleItemID = "SaleItemID";
            public const string saleID = "SaleID";
            public const string productsAndUnitID = "ProductsAndUnitID";
            public const string saleAmount = "SaleAmount";
            public const string salePrice = "SalePrice";
            public const string saleMoney = "SaleMoney";
            public const string saleProfit = "SaleProfit";
            public const string isDeleted = "IsDeleted";
        }

        /// <summary>
        /// 默认构造函数
        /// <summary>
        public SaleItemModel() { }

        /// <summary>
        /// 带参构造函数
        /// <summary>
        ///<param name="saleItemID"></param>
        ///<param name="saleID">销售主表ID</param>
        ///<param name="productsAndUnitID">产品和单位关系ID</param>
        ///<param name="saleAmount">销售数量</param>
        ///<param name="salePrice">销售单价</param>
        ///<param name="saleMoney">销售金额</param>
        ///<param name="saleProfit">销售利润</param>
        ///<param name="isDeleted">是否已经被删除</param>
        public SaleItemModel(int saleItemID, int saleID, int productsAndUnitID, decimal saleAmount, decimal salePrice, decimal saleMoney, decimal saleProfit, Boolean isDeleted)
        {
            this._saleItemID = saleItemID;
            this._saleID = saleID;
            this._productsAndUnitID = productsAndUnitID;
            this._saleAmount = saleAmount;
            this._salePrice = salePrice;
            this._saleMoney = saleMoney;
            this._saleProfit = saleProfit;
            this._isDeleted = isDeleted;
        }

        /// <summary>
        /// 
        /// <summary>
        public int SaleItemID
        { 
            get { return _saleItemID; }
            set { _saleItemID = value; }
        }

        /// <summary>
        /// 销售主表ID
        /// <summary>
        public int SaleID
        { 
            get { return _saleID; }
            set { _saleID = value; }
        }

        /// <summary>
        /// 产品和单位关系ID
        /// <summary>
        public int ProductsAndUnitID
        { 
            get { return _productsAndUnitID; }
            set { _productsAndUnitID = value; }
        }

        /// <summary>
        /// 销售数量
        /// <summary>
        public decimal SaleAmount
        { 
            get { return _saleAmount; }
            set { _saleAmount = value; }
        }

        /// <summary>
        /// 销售单价
        /// <summary>
        public decimal SalePrice
        { 
            get { return _salePrice; }
            set { _salePrice = value; }
        }

        /// <summary>
        /// 销售金额
        /// <summary>
        public decimal SaleMoney
        { 
            get { return _saleMoney; }
            set { _saleMoney = value; }
        }

        /// <summary>
        /// 销售利润
        /// <summary>
        public decimal SaleProfit
        { 
            get { return _saleProfit; }
            set { _saleProfit = value; }
        }

        /// <summary>
        /// 是否已经被删除
        /// <summary>
        public Boolean IsDeleted
        { 
            get { return _isDeleted; }
            set { _isDeleted = value; }
        }
    }
}
